package ui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import tree.PageTree;
import util.Util;

/**
 * Action to insert a blank page.
 * @author TKington
 *
 */
public class InsertNodeAction extends AbstractAction {
	/**
	 * Creates a new InsertNodeAction.
	 */
	public InsertNodeAction() {
		putValue(NAME, "BlnkPg");
		putValue(SHORT_DESCRIPTION, "Insert Blank Page");
		//putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));
		putValue(SMALL_ICON, Util.getIcon("Add16.gif")); //$NON-NLS-1$
	}
	
	public void actionPerformed(ActionEvent evt) {
		PageTree tree = PageTree.instance();
		tree.insertBlankNode();
	}
}
